package com.muyu.danmo.service.impl;


import com.muyu.danmo.domain.DanmoPrintingWorks;
import com.muyu.danmo.mapper.DanmoPrintingWorksMapper;
import com.muyu.danmo.service.IDanmoPrintingWorksService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 印刷出版作品Service业务层处理
 *
 * @author yangle
 * @date 2024-10-21
 */
@Service
public class DanmoPrintingWorksServiceImpl implements IDanmoPrintingWorksService
{
    @Autowired
    private DanmoPrintingWorksMapper danmoPrintingWorksMapper;

    /**
     * 查询印刷出版作品
     *
     * @param id 印刷出版作品主键
     * @return 印刷出版作品
     */
    @Override
    public DanmoPrintingWorks selectDanmoPrintingWorksById(Long id)
    {
        return danmoPrintingWorksMapper.selectDanmoPrintingWorksById(id);
    }

    /**
     * 查询印刷出版作品列表
     *
     * @param danmoPrintingWorks 印刷出版作品
     * @return 印刷出版作品
     */
    @Override
    public List<DanmoPrintingWorks> selectDanmoPrintingWorksList(DanmoPrintingWorks danmoPrintingWorks)
    {
        return danmoPrintingWorksMapper.selectDanmoPrintingWorksList(danmoPrintingWorks);
    }

    /**
     * 新增印刷出版作品
     *
     * @param danmoPrintingWorks 印刷出版作品
     * @return 结果
     */
    @Override
    public int insertDanmoPrintingWorks(DanmoPrintingWorks danmoPrintingWorks)
    {
        return danmoPrintingWorksMapper.insertDanmoPrintingWorks(danmoPrintingWorks);
    }

    /**
     * 修改印刷出版作品
     *
     * @param danmoPrintingWorks 印刷出版作品
     * @return 结果
     */
    @Override
    public int updateDanmoPrintingWorks(DanmoPrintingWorks danmoPrintingWorks)
    {
        return danmoPrintingWorksMapper.updateDanmoPrintingWorks(danmoPrintingWorks);
    }

    /**
     * 批量删除印刷出版作品
     *
     * @param ids 需要删除的印刷出版作品主键
     * @return 结果
     */
    @Override
    public int deleteDanmoPrintingWorksByIds(Long[] ids)
    {
        return danmoPrintingWorksMapper.deleteDanmoPrintingWorksByIds(ids);
    }

    /**
     * 删除印刷出版作品信息
     *
     * @param id 印刷出版作品主键
     * @return 结果
     */
    @Override
    public int deleteDanmoPrintingWorksById(Long id)
    {
        return danmoPrintingWorksMapper.deleteDanmoPrintingWorksById(id);
    }
}
